package com.yunxi.service.dubboService.impl.vehicle.bizToBaseData;

import com.yunxi.bizToBaseData.service.Biz2BaseVehicleConfigDubboService;
import com.yunxi.service.localService.vehicle.VehicleConfigService;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

public class Biz2BaseVehicleConfigDubboServiceImpl implements Biz2BaseVehicleConfigDubboService {

    @Autowired
    @Qualifier("vehicleConfigServiceImpl")
    VehicleConfigService configService;

    /**
     * 根据15位码颜色查询 车型默认工程配置
     *
     * @param vehicleCode 15位码
     * @param inCode 内饰
     * @param outCode 外饰
     * @param customPackCode 选装包
     * @param allConfigMap 全量工程配置 Map<key:特征值,value:特征族>
     * @return 工程配置集合
     */
    @Override
    public Map<String, String> loadEngineeringConfigByVehicleCode(String vehicleCode, String inCode, String outCode,
        String customPackCode, Map<String, String> allConfigMap) {
        return configService.loadEngineeringConfigByVehicleCode(vehicleCode,inCode,outCode,customPackCode,allConfigMap);
    }


    /**
     * 查询全量工程配置
     *
     * @return 工程配置集合
     */
    @Override
    public Map<String, String> loadAllEngineeringConfig() {
        return configService.loadAllEngineeringConfig();
    }

    /**
     * 校验单车配置是否满足条件
     *
     * @param condition 条件
     * @param configMap 单车配置 Map<key:特征族,value:特征值>
     * @return true or false
     */
    @Override
    public boolean checkIsMeet(String condition, Map<String, String> configMap) {
        return configService.checkIsMeet(condition,configMap);
    }
}
